home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HPAVC
/
HPAVC CD-ROM.iso
/
FNTPAK32.ZIP
/
PASCAL.EXE
/
FONT_PAK.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1995-08-16
|
7KB
|
207 lines
{========================================================== Font_Pak.Pas
A Pascal unit declaring Font Pak procedures and functions.
ALL procedures are FAR calls! BE SURE to declare callable
OBJ fonts as FAR calls by using $F+. See below for an example.
Except in one case, pass ALL parameters by VALUE.
The exception is rsButtonPressed. Pass Row and Column
by reference (Var) so we can update them.
========================================================== Font_Pak.Pas}
Unit Font_Pak;
{============================================================ Interface }
Interface
{============================================= LINK required OBJs fonts }
{$Define FP_Shareware} { determines what's linked below }
{ Delete this in REGISTERED versions }
{$IFDEF FP_Shareware}
{$L fontpakP.OBJ} { Shareware versions include 1 OBJ which contains ALL
procedures (except LoadFontFile which is in ONDisk).
BE SURE to link the "P" (Pascal) version! }
{$ELSE}
{$L Video.OBJ} { REGISTERED versions }
{$L Fonts.OBJ}
{$L GFX_Font.OBJ}
{$L Mouse_P.OBJ}
{$L LDCursor.OBJ}
{$L LdGFXcur.OBJ}
{$L LdSymbol.OBJ}
{$ENDIF}
{=========================== Sample declarations for CALLable fonts }
{ Declare YOUR callable OBJ fonts here -- those you create with Font2Asm }
{ Declaring them in the INTERFACE ensures Pascal will make FAR calls -- }
{ as is REQUIRED by all our ASM routines. }
(* {$F+} procedure [fontname.ext] (Block: integer); {$F-} *)
(* ^^^^^ redundant here; but use {$F+} if you declare fonts in programs *)
{==================================== Video-related procedures -- Video.Obj}
procedure fpInitialize; { required in shareware versions only }
{ determine type of monitor in use }
function GetMonitor: integer;
{ select brite backgrounds or blinking }
procedure BrightBG (OnOff: integer);
{ switch color palettes to achieve bright backgrounds, preserve blinking colors}
procedure DefaultPalette (Which: integer);
{select dark blue background, preserve blinking -- a subset of DefaultPalette}
procedure DarkBlue;
function SetMaxLines(FontHeight: Integer): Integer;
procedure WriteChar (Row, Column, AsciiCode, Colr: Integer);
procedure SetCursorPos(Row, Column : Integer);
{========================= Text-mode Font-related procedures -- Fonts.Obj}
{ select 1 or 2 blocks to turn on font(s) you loaded into these blocks }
procedure rsWhichFonts (LoIntensity, HiIntensity: integer);
{ pre-load font blocks, or restore default font }
procedure rsLoadDefault (WhichSize, Block: integer);
{ called by ONDISK... routines, help load font from disk, or a transformed one }
procedure rsLoadFont (bufSegAddr:Pointer; Block, NumChars, FontHeight, FirstChar: integer);
{ alternate declaration ::: segment & address passed as 2 integers }
{ procedure rsLoadFont (bufSeg, bufAddr, Block, NumChars, FontHeight, FirstChar: integer);}
{=========================================== Mouse-related procedures }
{ initialze the mouse, see if there is one }
function rsThereIsAMouse:integer;
{ hide or display mouse cursor }
procedure rsHidecursor;
procedure rsShowcursor;
{ rsButtonPressed returns which mouse button was pressed, and if so, where.
- NOTE that Row and Column MUST be passed by reference so we can update them.
- GFXorText: Pass 0 to get text mode Row/Col,
or -1 to get graphics mode pixel coordinates
- returns which button was pressed: 0 (none) 1 (left) 2(right)
3 (both) 4 (middle)
}
function rsButtonPressed (Var MouseRow, MouseCol:Integer; GFXorText: Integer):Integer;
{=================================== TEXT-mode mouse shape procedures }
{ To select the ASCII char to be used as mouse cursor shape. }
{ Also select the colors of mouse cursor. }
procedure rsSetTextCursor (ForeGround, BackGround, AsciiChar:Integer);
procedure rsSetTextCursorC (AsciiChar:Integer);
{ To select a mouse cursor shape from our custom library of shapes: 8x16 or 8x8}
procedure rsLoadMouseCursor (Block, WhichShape, ASCIICode:Integer);
procedure rsLoadMouse8 (Block, WhichShape, ASCIICode:Integer);
{ determine how many 16- and 8-point mouse shapes are in our libraries }
function Num16Shapes: integer;
function Num8Shapes: integer;
{=================================== GRAPHICS-mode mouse shape procedures }
{ To select a GRAPHICS-MODE mouse cursor shape from a library of shapes. }
procedure rsLoadGFXCursor (WhichShape, HotSpotX, HotSpotY : Integer);
function NumGFXShapes : Integer;
{====================================== TEXT-mode Symbol/Icon procedures }
{ To select the 1- or 2-byte symbols or icons. Also see }
{ rsLoadMouseCursor which contains other 1-byte shapes which }
{ may be used as symbols/icons. }
procedure rsLoadSymbol (Block, WhichShape, ASCIICode:Integer);
function Num16Symbols : Integer;
{============================== Graphics-mode Font-related procedures }
{ in EGA/VGA graphics modes ONLY, select the 8-, 14- or 16-point font }
{ or restore the default font }
procedure GFXFont08;
procedure GFXFont14;
procedure GFXFont16;
{===================================================== Implementation }
Implementation
{ edit this to declare the callable OBJ fonts YOU create using Font2Asm }
{
procedure Hollow9; external;
procedure Script1; external;
procedure Frazzle; external;
}
procedure fpInitialize; external; { required in shareware versions only }
function GetMonitor; external;
procedure BrightBG; external;
procedure DefaultPalette; external;
procedure DarkBlue; external;
function SetMaxLines; external;
procedure WriteChar; external;
procedure SetCursorPos; external;
procedure rsWhichFonts; external;
procedure rsLoadDefault; external;
procedure rsLoadFont; external;
function rsThereIsAMouse; external;
procedure rsHidecursor; external;
procedure rsShowcursor; external;
function rsButtonPressed; external;
procedure rsSetTextCursor; external;
procedure rsSetTextCursorC; external;
procedure rsLoadMouseCursor; external;
procedure rsLoadMouse8; external;
function Num16Shapes; external;
function Num8Shapes; external;
procedure GFXFont08; external;
procedure GFXFont14; external;
procedure GFXFont16; external;
procedure rsLoadGFXCursor; external;
function NumGFXShapes; external;
procedure rsLoadSymbol; external;
function Num16Symbols; external;
End.